From 2d2eeace3b81236793dc26491a8abcaa1385c878 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 20 May 1994 22:27:30 +0000 Subject: [PATCH] (choose-completion): Include words separated by single spaces in the completion. --- lisp/simple.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index 326082318bc..5f58d18e74e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2438,8 +2438,16 @@ it were the arg to `interactive' (which see) to interactively read the value." (interactive) (let (beg end) (skip-chars-forward "^ \t\n") + (while (looking-at " [^ \n\t]") + (forward-char 1) + (skip-chars-forward "^ \t\n")) (setq end (point)) (skip-chars-backward "^ \t\n") + (while (and (= (preceding-char) ?\ ) + (not (and (> (point) (1+ (point-min))) + (= (char-after (- (point) 2)) ?\ )))) + (backward-char 1) + (skip-chars-backward "^ \t\n")) (setq beg (point)) (choose-completion-string (buffer-substring beg end)))) -- 2.30.2